package com.literature.search.file.entity.vo;

import com.literature.search.core.entity.EsPicObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * @Author: DangKong
 * @Date: 2023/3/2 21:43
 * @Description:
 */



@Data
@ApiModel("ES中每一个图片对象VO")
public class EsPicObjectVO implements Serializable {

    private static final long serialVersionUID = 1L;


    @ApiModelProperty("图片ID")
    private String id;


    @ApiModelProperty("所在页码")
    private Integer pageNumber;

    @ApiModelProperty("图片OCR识别内容")
    private String content;

    @ApiModelProperty("标签")
    private String tag;


    @ApiModelProperty("相关性得分")
    private Float score;

    @ApiModelProperty("Highlight内容")
    private String highlightContent;

    public void setFromEsPicObject(EsPicObject esPicObject) {
        this.id = esPicObject.getId();
        this.pageNumber = esPicObject.getPageNumber();
        //this.content = esPicObject.getContent();
        this.tag = esPicObject.getTag();
    }
}
